<?
session_start();
      if (isset($_SESSION['k_username'])) {
include ("conexion.inc.php");
$link = Conectarse();
$editadopor=$_SESSION['k_username'];
$fecha = date("y-m-d h:i:s");
mysql_select_db("gotica_ordencompras" ,$link);
$sql = "DELETE FROM detallepedido WHERE idorden=$_POST[idorden]";
$sql1 = "DELETE FROM ordencompra WHERE idorden=$_POST[idorden] ";
$resulta = mysql_query($sql);
$resulta1 = mysql_query($sql1);
echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"verordenes.php\"";
echo "</SCRIPT>";}
else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}

?>